/**
 * Copyright &copy; 2012-2015 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.soccer.cms.modules.gen.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;

import com.soccer.cms.common.persistence.Page;
import com.soccer.cms.common.service.CrudService;
import com.soccer.cms.modules.gen.entity.GenReferentity;
import com.soccer.cms.modules.gen.dao.GenReferentityDao;

/**
 * 关联实体Service
 * @author zouqh
 * @version 2015-05-25
 */
@Service
@Transactional(readOnly = true)
public class GenReferentityService extends CrudService<GenReferentityDao, GenReferentity> {

	public GenReferentity get(String id) {
		return super.get(id);
	}
	
	public List<GenReferentity> findList(GenReferentity genReferentity) {
		return super.findList(genReferentity);
	}
	
	public Page<GenReferentity> findPage(Page<GenReferentity> page, GenReferentity genReferentity) {
		return super.findPage(page, genReferentity);
	}
	
	@Transactional(readOnly = false)
	public void save(GenReferentity genReferentity) {
		super.save(genReferentity);
	}
	
	@Transactional(readOnly = false)
	public void delete(GenReferentity genReferentity) {
		super.delete(genReferentity);
	}
	
	@Transactional(readOnly = false)
	public void delete(String ids) {
		if(!StringUtils.isEmpty(ids)){
			String [] idArray = ids.split(",");
			for (String id : idArray) {
				GenReferentity genReferentity = super.get(id);
				super.delete(genReferentity);
			}
		}
	} 
	
}